Literally 'what-like' — Proto-Germanic *hwalikaz, same compound pattern behind 'such' and 'each.'
Asking for information specifying one or more members of a set; used to introduce a relative clause giving further information.
From Old English 'hwilc, hwylc' (which, what sort of), from Proto-Germanic *hwalīkaz, a compound of *hwaz (who) + *-līkaz (body, form, like), literally meaning 'of what form' or 'what-like.' The same formation produced German 'welch' (which) and Dutch 'welk.' The '-lich/-like' element is the ancestor of English '-ly' and 'like' — so 'which' is etymologically 'what-like,' asking about the form or character of something within a known set. Key roots: *kʷó- (Proto-Indo-European: "interrogative stem (who, what)"), *līkaz (Proto-Germanic: "body, form, appearance (cf. 'like')").
'Which' literally means 'what-like' — Proto-Germanic *hwalīkaz is a compound of *hwaz (who/what) + *-līkaz (form, body). The same '-like' element appears in 'such' (so-like), 'each' (ever-like), and the suffix '-ly' (in a -like manner). So 'friendly' means 'friend-like,' and 'which' means 'what-like.'