The story that you are referring to is Jesus talking to a wealthy young man. And here it is:
Matthew 19:17-26 King James Version (KJV)
17 And he said unto him, Why callest thou me good? there is none good but one, that is, God: but if thou wilt enter into life, keep the commandments.
18 He...