First you need to make a list of commands and associated functions that are to process them. Then you have several options, probably the simplest is to use a switch statement for each command
char command = 'B';
switch(command)
{
case 'A':
// do something
break;
case 'B':
// do something
break;
// etc.
}