The tricky word conundrum is used to describe a riddle or puzzle, sometimes including a play on words or pun.
One of the most famous conundrums is the riddle of the Sphinx, famously in the play Oedipus the King by Sophocles. Oedipus encounters the Sphinx, a mythical beast, who asks him, "What walks on four legs in the morning, two in the afternoon, and three in the evening?" The answer is "A person": crawling as a child, walking as an adult, and using a cane in old age. The scary thing is that if the Sphinx asked you the riddle and you didn't know, she'd eat you!