How do you translate into Spanish?

He asked me whether I like math

The correct translation is:

   Me preguntó si me gustan las matemáticas