I have a table with alternative spellings of country names:
Use name, Alt1, Alt2, Alt3, Alt4
[...]
Bahamas, "Bahamas, The"
Bolivia
Bosnia and Herzegovina, Bosnia & Herzegovina
[...]
(Some countries have 0 alternative spellings, other up to 4.)
Given a country string, what is performance-wise the best solution to returning the element in the first column? (In most of the cases, independent of the number of alternative spellings, the string matches the first column and doesn't have to be name-matched. In the other cases the probability is evenly distributed across column 2-X.
(Preferably in JavaScript or PHP, thanks :) )