Uses of Questions in direct and indirect speech. We can use - asked, inquired, wanted to know and wondered instead of said in indirect question.
questions in direct and indirect, question tags in speeches, use of interrogatives in indirect, uses of direct indirect https://www.englishmirror.com/english-grammar/questions-statements.html