The teacher had(A) three students in(B) this English speech contest, and all of which(C) won the first prize(D).
C
and连接两个句子,所以后面应为all of them.