Psalm 18:25 in the King James Version
With the merciful thou wilt shew thyself merciful; with an upright man thou wilt shew thyself upright;
Context
24 Therefore the LORD has rewarded me according to my righteousness, according to the cleanness of my hands in his eyesight.
25 With the merciful you will show yourself merciful. With the perfect man, you will show yourself perfect.
26 With the pure, you will show yourself pure. With the crooked you will show yourself shrewd.