Answer

The king would not select two white hats and one black hat. This would mean two princes would see one black hat and one white hat. You would be at a disadvantage if you were the only prince wearing a black hat.

If you were wearing the black hat, it would not take long for one of the other princes to deduce he was wearing a white hat.

If an intelligent prince saw a white hat and a black hat, he would eventually realize that the king would never select two black hats and one white hat. Any prince seeing two black hats would instantly know he was wearing a white hat. Therefore if a prince can see one black hat, he can work out he is wearing white.

Therefore the only fair test is for all three princes to be wearing white hats. After waiting some time just to be sure, you can safely assert you are wearing a white hat