Which is defined as identifying what one(s) out of a group.(pronoun)
An example of which is of a group of potential employees or of a selection of books.
The definition of which is what one(s) of those mentioned.(adjective)
An example of which is what book or what shirt.
See which in Webster's New World College Dictionary
Origin: ME whiche < OE hwylc, hwelc, for *hwa-lic, lit., who like (akin to Goth hwileiks, OHG hwelīh, Ger welch): see who & -ly
See which in American Heritage Dictionary 4
Origin: Middle English
Origin: , from Old English hwilc; see kwo- in Indo-European roots. Usage Note: The relative pronoun which is sometimes used to refer to an entire sentence or clause, rather than a noun or noun phrase, as in She ignored him, which proved to be unwise. They swept the council elections, which could never have happened under the old rules. While these examples are unexceptionable, using which in this way sometimes produces an ambiguous sentence. Thus It emerged that Edna made the complaint, which surprised everybody leaves unclear whether it was surprising that a complaint was made or that Edna made it. The ambiguity can be avoided with paraphrases such as It emerged that the complaint was made by Edna, a revelation that surprised everybody. • Which may be used to refer to an entire sentence or clause only when it is preceded by that sentence or clause. When the referent follows, what should be used, particularly in formal style: Still, he has not said he will withdraw, which is more surprising but Still, what (not which) is more surprising, he has not said he will withdraw. See Usage Notes at that, what, whose.
Learn more about which