This refers to a predicament from which there is no escape because of conditions which contradict or exclude each other. It comes from Joseph Heller's novel Catch22 in which a bomber pilot pretends to be insane so that he will be grounded, but his wish to avoid danger shows his sanity.