The correct answer is whatever.
Whatever he did to study for the final exam must have been helpful; his grade improved from a B to an A.
The point of this assignment is to add the appropriate pronoun - either which, that, so what, or whatever. Whatever is the only option that fits the example above because the other options don't make any sense.