Old English hwænne, hwenne, hwonne, from Proto-Germanic *hwan- (source also of Old Saxon hwan, Old Frisian hwenne, Middle Dutch wan, Old High German hwanne, German wann "when," wenn "if, whenever"), from pronominal stem *hwa-, from PIE root *kwo-, stem of relative and interrogative pronouns. Equivalent to Latin quom, cum. As a conjunction in late Old English. Say when "tell me when to stop pouring you this drink" is from 1889.
as adv., conj., pron.
c. 1200, worn-down form of Old English alswa "quite so, wholly so," literally "all so" (see also), fully established by c. 1400. Equivalent to so; any distinction in use is purely idiomatic. Related to German als "as, than," from Middle High German also.
Phrase as well "just as much" is recorded from late 15c.; the phrase also can imply "as well as not," "as well as anything else." Phrase as if, in Kantian metaphysics (translating German als ob), introducing a supposition not to be taken literally, is from 1892; as an interjection of incredulity (as if!; i.e. "as if that really could happen") is attested from 1995. It duplicates Latin quasi. Phrase as it were "as if it were so" is attested from late 14c.