i want to create a selection that automaticly goes into the right sub menu

for example is counter=1 then gosub routine1, counter=2 then gosub routine2, counter=3 then gosub routine3 etc.

something like this:

main routine:

counter=counter+1
'do whatever i wanna do

gosub routine(counter)

'and on
goto main

routine1:
'do 1st:return

routine2:
'do 2nd:return

routine3:
'do 3th:return

can this be done simple in picbasic, so i can keep my main program short !

thanx allready for your ideas and suggestions