But how is it to your credit if you receive a beating for doing wrong and endure it? But if you suffer for doing good and you endure it, this is commendable before God.
NIV
[After all] what kind of glory [is there in it] if, when you do wrong and are punished for it, you take it patiently? But if you bear patiently with suffering [which results] when you do right and that is undeserved, it is acceptable and pleasing to God.
AMP
For what glory is it, if, when ye be buffeted for your faults, ye shall take it patiently? but if, when ye do well, and suffer for it, ye take it patiently, this is acceptable with God.
KJV
Each of you should test your own actions. Then you can take pride in yourself, without comparing yourself to somebody else
NIV
But let every person carefully scrutinize and examine and test his own conduct and his own work. He can then have the personal satisfaction and joy of doing something commendable [in itself alone] without [resorting to] boastful comparison with his neighbor.
AMP
But let every man prove his own work, and then shall he have rejoicing in himself alone, and not in another.
KJV