whoever
used in statements
You use whoever to refer to any person involved in the kind of situation you are describing.
You can have whoever you like to visit you.
Whoever is the last to leave should lock the door.
You also use whoever to refer to someone whose identity you do not know.
Whoever answered the telephone was a very charming woman.
You also use whoever to say that the identity of someone will not affect a situation.
Whoever you vote for, prices will go on rising.
used in questions
Whoever is sometimes used when asking questions, in order to express surprise.
Whoever could that be, calling so late?
However, many people consider this form to be incorrect, and it is better to write who ever as two separate words.
Who ever told you that?