The case of a pronoun (including a relative pronoun) is determined by the role it plays in the clause. It's: 'he praised them who were good' Same deal in the next one: 'they who were wicked whom others did retribution to'