I'm sorry to say that I don't have a whole lot to go on with this one.
It's likely a sword and sorcery story, and it's also likely that I read it in a collection of short stories some time in the 1990's, although my instinct is to think that the collection was older than that (maybe even a DAW book from the 1970's). Also, frankly, I remember so little about it that it may have been a 'weird planet' story or even space opera genre tale.
The main character of the tale was imprisoned in a city that was famous for its awful and inventive tortures, and he had something like a week to live, with his tortures getting worse every day. I don't think he was a criminal, but he might have been a spy, or an enemy combatant that had been captured.
Each night, a woman from the city snuck in and tended to his wounds, just a little bit, and she promised to help him escape, "soon", if he could just hold out a little bit longer.
Towards the end of the tale she revealed herself to be one of the torturers, and the hope that she was giving him was part of the torture itself, and by taking his hope away she was helping to complete his torture.
And that's all I remember! I don't recall how it ended or exactly why he'd been imprisoned, but the image of hope being part of the torture has always stuck with me.
I'd love to track this story down and read it so I can find out how it ends!