He said to me, "Do you like the apple pie?"- He asked to me that I liked the apple pie. Исправьте ошибки
He said to me, "Do you like the apple pie?"- He asked me if I liked the apple pie.
В косвенной речи общие вопросы вводятся в предложение союзами if или whether