①He said,"Can you swim,Tom?"
→He asked Tom if / whether he could swim.
②He asked,"Do you go to school by bus or by bike?"
→He asked me if / whether I went to school by bus or by bike.
③He asked,"Tom is a boy,isn't he?'"
→He asked whether Tom was a boy or not.