From Proto-Slavic *koda, from which the following words also were derived: Old Church Slavonic къгда (kŭgda), Bulgarian кога (koga), Polish kiedy, Serbo-Croatian када, Czech kdy, Polish gdy, Lower Sorbian gdy. Originally the word was probably *koda; compare Lithuanian kada (“when”), Latvian kad, Old Indic kadā, Avestan kadā. From *koda came *kъdа, possibly under the influence of *kъdе, kъtо. On the other hand, one may perceive in когда (kogda) the old instrumental singular *godō of the word год (god) (the old meaning of which was “time, period”) with the interrogative particle ко-, making a genitive singular form *kogo goda (which time?). Thus the -гда ending may have derived from the genitive of год (god, “period of time”).
когда́ • (kogdá)