It depends on how you want to use the input. Do you want A1 to do one thing and B1 to do an entirely different thing, or do you want A to do one thing, and B to do another, or 1 to do something in addition to A and B, and 2 to do something different in addition to A and B?
Psuedo:
get input
if(input_character == "a1")
do something
if(input_character == "b1")
do something else
or
get input
if(input_character == "a")
do something
if(input_character == "b")
do something else
if(input_number == "1")
do something in addition
if(input_number == "2")
do something else in addition
Also, can the user input more than 1 character or more than 1 number in the same input? That can change how the program needs to work.