It: It was him who she had mentioned before she died

Dear teachers,

Please choose the correct sentences:

  1. It was him who she had mentioned before she died.
  2. It was him that she had mentioned before she died.
    3.It was him she had mentioned before she died.

Is there a rule?
I think all are correct. How about you?
Quoc

Hi,

I have a question for you. Where did you find these sentences?

Alan

All are correct in grammar?

These are from my teacher.