"The Bachelorette Problem" (slightly adapted from Tao's Google+ account) [duplicate]
Solution 1:
Pick a random prince, then ask him:
Is he [pointing to one of his brothers] older than him [pointing to the second one]?
If you receive "Yes" as an answer, choose the second brother, otherwise choose the first. This ensures you will not marry the middle one.
Explanation:
If the prince you asked is the eldest, he will answer truthfully, and you will pick the youngest.
If the prince you asked is the youngest, he will lie, and you will pick the eldest.
If the prince you asked is the middle one, he will answer randomly, and you will pick one of the two others, as desired.
Edit:
More information about the many variations of this puzzle can be found by searching for the term "Knights and Knaves", which is the name logician and author Raymond Smullyan used to describe these problems.
Of particular interest is a problem known as The Hardest Logic Puzzle Ever, which has the same basic setup as the "princes(ses)" puzzle – lier, truther and random answerer – but with more information needing to be extracted and the additional complication that instead of "Yes" and "No", equivalent words in some esoteric language are used and it is unknown which word means which.
Solution 2:
Ask the middle one if the youngest is more truthful than the eldest. If the answer is "no" then marry the youngest, otherwise marry the eldest.
That way, if the middle one is the liar, he is guaranteed to marry the most truthful of the remaining two, which is the 100% truthful princess. If the middle one is the truthful one, then he is guaranteed to marry the least truthful of the remaining two, who is the habitual liar. If the middle one sometimes tells the truth and sometimes lies then it doesn't matter which of the other two he marries (for the purposes of this riddle...).
This is just the answer I gave in the comment above, removing the mistake pointed out by Theo Buehler (and the implicit ageism in assuming the prince would rather marry one of the younger two).