I have part of a query that checks a string and returns a 2 letter code. the string is 9 characters long and consists of 1's and 0's, but it is picking the wrong 2 letter code
String Code
100000000 AC
010000000 AR
001000000 CD
000100000 MC
000010000 MR
000001000 PLS
000000100 PS...