You are confusing too many different Bible verses together. You are mixing up Matthew 7:23 with Matthew 25:21, 34, 41. Here they are:
Matthew 7:23 And then will I profess unto them, I never knew you: depart from me, ye that work iniquity.
Matthew 25:21 His lord said unto him, Well done, thou good and faithful servant: thou hast been faithful over a few things, I will make thee ruler over many things: enter thou into the joy of thy lord.
Matthew 25:34 Then shall the King say unto them on his right hand, Come, ye blessed of my Father, inherit the kingdom prepared for you from the foundation of the world:
Matthew 25:41 Then shall he say also unto them on the left hand, Depart from me, ye cursed, into everlasting fire, prepared for the devil and his angels: