From Middle English whennes, from Old English hwanon (with adverbial genitive -s), related to hwonne (whence when). Analyzable as when + -s.
Practice speaking and memorizing "whence" and many other words and sentences in English.