The word you're looking for is prejudiced. While a generic word, prejudice comprises favoritism, or its opposite, to any particular group of people who have something in common. To be prejudiced is simply to pre-judge some group of people as being either inherently unworthy of favor or worthy of favor.
A prejudiced person gives little or no consideration to a person's actual worthiness (e.g., objective criteria such as experience, brightness, motivation, integrity, character and the like), but to an assumed worthiness based on nationality, language, accent, family ties, friendship ties, skin color, religion, sex, sexual orientation, age, subculture, schools attended, socio-economic status, and how a person parts his or her hair! In other words, virtually any factor by which someone can be adjudged different and therefore better or worse than someone else.
Based on what I've said above, please do not infer that prejudice is always a bad thing; it is not. I'm prejudiced against prejudiced people for whom the basis of their prejudice is one or more of the above factors I've listed. Furthermore, I'm prejudiced against evil, wicked, violent, intolerant, greedy, selfish, lazy, hateful, bigoted, narrow-minded, overly irreverent, rude, crude, and lewd people. And the list goes on.