The simplest way to do this is to have a switch/case taking in a variable that you predetermine before a match and having the separate autonomous modes there. For example...
Code:
int position = 1;
switch(position) {
case 1:
// autonomous mode for close
break;
case 2:
// autonomous mode for mid
break;
case 3:
// autonomous mode for far
break;
}
It is also legal to have a "switch" of some sorts on your robot plugged into your sidecar that you flip before the match as you set up your bot to determine position (in which case your code would still look similar to the code above).