Which class are you in?

====================
What is the similar sentence to the previuous one?

You are in math class.

1. Which class are you in?
2. I'm in math class.

Yes, your sentences and question are correct. These are also possible, depending on what you mean:

What class are you taking?
I'm taking World History 1.
I'm in math class each afternoon.

What class are you in right now?
I'm in math.
I'm in English class.

What courses are you taking?
I'm taking physics and Spanish.

Which graduating class are you in?
I'm in the class of 2018.

To find a similar sentence to the previous one, you can rephrase it by changing the structure or using synonymous words. One possible rephrasing could be:

"Which grade are you currently studying in?"