Life imitates Art, I suppose.
In the end of The Wrath of Khan, of course, Kirk didn't beat the Kobayashi Maru. He couldn't escape the no-win scenario. That was the whole point of the film.
And when he tried to change the outcome in Star Trek III, he lost the Enterprise and his son as a result.... but he did succeed in getting Spock back, which was the goal of his quest.
Kirk himself put it best, I think:
"And yet, in the midst of our sorrow it should be noted that this death takes place in the shadow of new life, the sunrise of a new world..."
But then, in The Voyage Home, Kirk was surprised by another reward, his secret heart's desire:
A demotion to Captain.... and a new Enterprise, almost exactly the same as his old one.
"All right, Mr. Sulu. Let's see what she's got."