Separate the balls into 3 groups of four. A(1,2,3 & 4), B(5, 6, 7 & 8) and C(9, 10, 11, 12).
Weigh groups A and B.
They balance. Bad ball is in C
Make new 3 groups A(1 & 9), B(2 & 10) & C(11 &12)
Weigh groups A and B.
They balance. Bad ball is in C again.
Make new 3 groups A(1), B(11) and C(12)
Weigh groups A and B Weigh groups A and B
They balance bad ball is 12, if not then bad ball is 11.
They do not balance. A is light & C group is good
Make new 3 groups A(7 2 & 3), B(8 5 & 6) & C(1 4 &9)
Weigh groups A and B
They balance. C group bad.
Make new 3 groups A(1), B(4) and C(9)
Balance, ball 9 is bad. If A is light ball A is bad, If B is light than ball 4 is bad.
Hopefully that is enough to figure out any other combinations.