'how do you do' is not, usually, a question (the concept of question coming from pragmatics), although its form is, as you spotted, interogative (initial wh-word + subj.-aux. inversion). also, rising intonation, while not always co-occuring with wh-questions, is absent.
a reasonable response to this formal-ish greeting is the mirror 'how do you do'.