Don't know why you were downvoted. You're thinking of Matthew 26:51-52.
"And, behold, one of them which were with Jesus stretched out his hand, and drew his sword, and struck a servant of the high priest's, and smote off his ear. Then said Jesus unto him, Put up again thy sword into his place: for all they that take the sword shall perish with the sword."
Don't know why you were downvoted. You're thinking of Matthew 26:51-52.