A wise man has been convicted of a capital crime and is to be put to death. The king decides to see how wise the man is. The king gives the man 12 pills, which appear identical in every way. However, one of them has a different weight. The wise man is told that the one pill with a different weight is the only safe pill - all of the others are poison (of course, you can't tell the different weights by feeling them). The king then gives the man a balancing scale that can distinguish the different weights, but the scale can only be used three times. After weighing the pills, the man must swallow one of the pills.
How does the man select the correct pill?