The police rounded up Jim, Bud and Sam yesterday because one of them

Q: The police rounded up Jim, Bud and Sam yesterday because one of them was suspected of having robbed the local bank. The three suspects made the following statements under intensive questioning. Jim : I’m innocent. Bud: I’m innocent. Sam: Bud is the guilty one. If only one of the statements turned out to be true, who robbed the bank?
A)Jim robbed the bank
B)Bud robbed the bank
C)Sam robbed the bank
D)Jim, Bud and Sam robbed the bank.

Answer: A

Key is only one of the statements turned out to be true.

If bud robbed the bank.

Jim “I’m innocent” true
Bud “I’m innocent” false
Sam “Bud did it” true

There’s 2 trues it doesn’t work.

If Sam robbed the bank 

Jim “I’m innocent” true
Bud “I’m innocent” true
Sam “Bud did it” false

There’s 2 trues again.

But if Jim robbed the bank.

Jim “I’m innocent” false
Bud “I’m innocent” true
Sam “Bud did it” false.

only one true statement.

Hence Jim robbed the bank