What subjects did you do in year 12 or what subjects did you do for year 12?
Both are acceptable. I'd use the first example (in year 12) for preference. Using "for" suggests purpose (I take these subjects so that I can go to school.)
Some commentators have suggested using "senior year". That would apply only to the American School system, in which "year 12" is the last year of High School. Each school system has different ways of describing the years. In England, year 12 is the first year in the sixth form, and not usually the last year at school.
In US usage, I would not expect to see any year described as "year 12" but rather as "12th grade" or "senior year in high school". "Senior year" alone could be confused with "senior year in college" unless the context makes the choice clear.
Also, in US usage, it would be unusual to speak of "doing" a subject. The most common verb would be "take", followed i think by "study", and perhaps then by "have". So, in US usage:
- What subjects did you take in 12th grade?
- I took history during my senior year in high school.
- I studied chemistry in the 12th grade.
- I had baseball as my Gym unit.
- I had a term paper mini-course for English last spring.
This is for anyone wating to compare US usage with that of other countries listed in other answers.