The only free and comprehensive online etymological dictionary of the Spanish language
quien, quién (Relative Pronoun) "who"
10th cent. From Latin quem "whom," accusative of qui "who." From Proto-Italic *kwim "whom." From Proto-Indo-European *kwi̯m 'id.'
Indo-European
Italic
South Picene pim "who," Paelignian pam 'id.'
Celtic
Old Irish cía "who," Old Welsh pui 'id.,' Old Breton pou 'id.,' Cornish pyw 'id.'
Germanic
Gothic ƕas "who," Old Norse hverr 'id.,' Old High German hwer 'id.,' Old Saxon hwē 'id.,' Old English hwā 'id.' (English who)
Hellenic
Ancient Greek τίς (tís) "who," Thessalian κις (kis) 'id.,' Mycenaean jo-qi- 'id.'
Phrygian
Phrygian κιν (kin) "whom"
Indo-Iranian
Sanskrit kím "what," "what for," Young Avestan cim "because"
Tocharian
A kus "who," B kuse 'id.'

"[It is entirely possible that] *kwi-/kw- was a relative pronoun in Proto-Indo-European. Both items became relative pronouns during the histories of individual languages, possibly at a stage early enough to be considered 'dialectical Proto-Indo-European'. Most scholars taking this line conclude that Proto-Indo-European therefore had no relative clauses." ~ P. Probert, Early Greek Relative Clauses (2015)