"Well Sire", began the jester fearfully, "I will tell you the story of the dream I had yesterday night. The dungeons were dark and damp, with all kinds of noises, and I couldn't sleep very well. Finally, as I dozed off, I dreamed that I was taken to the square and beheaded!"
"Hmm", said Akbar, "not a particularly interesting story; guards, take him away".
"But your majesty", said Birbal, "how shall we put him to death?"
Akbar paused. If his story was true, he should be hanged. But if the jester was hanged, then the story was false, because he had said that he was beheaded. Aha- so the jester told a lie and would be beheaded .. but then, the story would be true and he should be hanged ..
Akbar gave up! The jester thanked Birbal for his narrow escape, and was much more careful about his jokes after that!