The relative pronoun can be the subject or the object of its verb, and, as such is, either nominative (who) or objective (whom). Take a look at the following examples:
- The jury convicted the man who committed the murder. (The subject of the relative clause is who. It is in the nominative case.)
- The witness said that he saw Mr. Jones, whom the murderer shot. (The subject of the relative clause is murderer. The object of the verb shot is whom.)
Finally, a trick question:
Which of the following sentences is correct?
I will award the prize to whomever does his best.
or
I will award the prize to whoever does his best.
Whoever (a derivative of who) is the correct choice. The relative pronoun whoever is not the object of the preposition to; the entire phrase (whoever does his best) is. Whoever is the subject of the clause and belongs in the nominative case.