Two criminals, a con man and a card sharp, both wearing disguises as priests were arrested overnight, and put in separate cells in the Police Station. Unfortunately, a real priest who was there to comfort those arrested during the night has mistakenly been put in a third cell by an over zealous officer.
The two rogues, both sensing an opportunity, are claiming to be the real priest and demanding to be released. And quite reasonably, the real priest is also asking to be let out, as he has a service in his church.
This presents a problem. The priest can, of course, be relied upon to tell the truth; the con man tells lies for a living, and will therefore always lie; and the card sharp sometimes lies and sometimes tells the truth, depending which is to his advantage.
The Desk Sergeant asks the person in Cell One "Who are you?" and receives the reply "I'm the card sharp".
Moving to Cell Two he asks the occupant "Who is the man in Cell One?", getting the answer "He is the con man".
Lastly, at Cell Three he asks the prisoner "Who do you say is in Cell One?", this time hearing "The priest" in response.
At this point which cell door did he open and release its occupant with profuse apologies?
If the priest is in Cell One he would not say that he is the card sharp, so he is not in Cell One.
If the priest is in Cell Three he would not say that the occupant of Cell One is the priest, so he is not in Cell Three.
This means that the priest is in Cell Two.
By the by, this means that the con man is in Cell One, and the card sharp is in Cell Three, this time telling a lie.