My original comment about one-to-one, I realize, is not the best descriptor.
I've since edited the original post to reflect that and I'll try to explain the differences a little better.
In your original question, you have a base set (x) and you are looking to match values within that set. Since all the values are contained within a single set, this is easy.
In the new question, there are multiple sets (A, B, & C) that all have to be searched since each one could possibly contain the solution that you desire.
If there is a way to combine the multiple sets (like Will's above comment) into a single set (set S in Will's example), then the solution can be achieved much easier. Otherwise, the if/else tree or the switch/case ideas I mentioned are the best options, that I know of.