SQL to match string value against multiple columns
The queries are the same except potentially the second won't use index if any exists on grade_* columns. And this flipped approach Is rather uncommon (at least i see it for first time). Possibly because you wouldnt need such approach if you had a better tables structure.

What if suddently students can study history or biology? You Will need to create new columns And Alter all related queries.

Instead there should be a "subjects" table and an M:N relation table between subjects and students. Your query wont contain any ORs or INs the way it does now. And adding new subjects Is matter of  merely inserting new row to subjects table.