Reasoning

B is not the knight, since if he is, then A would also be the knight.

C is not the knight, since his statement would then be a lie. Therefore A is the knight.

Hence C is the knave, and B is the spy.