You are held in a windowless prison cell with two doors, each with a small hole to talk through and a roof-mounted light that gives you night and day.
There is a guard stationed outside each of the doors and you know that one will always lie, the other will always tell the truth; but you have no idea which is which and cannot distinguish the liar from the truth-teller.
Additionally, one of the doors will lead you to freedom, the other to your death (never mind what 'freedom' or 'death' might entail, just assume one door is very good, the other very bad!).
You are to choose one of the doors, knock on it and having done so, it will be opened and you will be lead to the appropriate outcome.
The guards have been randomly assigned to the doors, but do know which door they are guarding (good or bad outcome).
You are permitted to ask just one question of one of the guards. What do you ask in order to be sure that the door you choose leads to freedom?