ON-OFF 4 relays to change connect state
You can combine to manage each cell volt
0000 = (S1+S2+S3) 12V
0001 = S1! (S2+S3) 8V
0010 = S2! (S1+S3) 8V
0100 = S2! (S1+S3) 8V
1000 = S3! (S1+S2) 8V
0011 = S3+[S1#S2] 8V
1100 = S1+[S2#S3] 8V
1011 = S3! [S1#S2] 4V
1101 = S1! [S2#S3] 4V
0111 = S3+[S1!S2!] 4V
1110 = S1+[S2!S3!] 4V
0101 = S3+ S1! S2! 4V
1001 = S2+ S1! S3! 4V
1010 = S1+ S2! S3! 4V
1111 = [S1#S2#S3] 4V
0110 = S1? S2? S3? 4V
I tested by real battery and defined this:
In this case, S1 & S3 create 2 output 4V
1 charge to S2, and 1 for output
Current output = current charge to S2