Old English andswaru "a response, a reply to a question," from and- "against" (from PIE root *ant- "front, forehead," with derivatives meaning "in front of, before") + -swaru "affirmation," from swerian "to swear" (see swear), suggesting an original sense of "sworn statement rebutting a charge." Meaning "solution of a problem" is from c. 1300.
It is remarkable that the Latin expression for answer is formed in exactly the same way from a verb spondere, signifying to engage for, to assure. [Wedgwood]
A common Germanic compound (cognates: Old Saxon antswor, Old Norse andsvar, Old Frisian ondser, Danish and Swedish ansvar), implying a Proto-Germanic *andswara-. The simpler idea of "a word in reply" is expressed in Gothic anda-vaurd, German Antwort.