The answer to your question would be that the sentence in which the pronoun "whom" is used correctly is the following one: Is he the man whom they selected to be captain of the ship?
Whom should be used to refer to the object of a verb or a preposition. In this case, whom functions as the object of the verb selected.