The event would work like this:
First off you need a variable (and in this example I'll call it maincclass) for when the player initially chooses his or her class (the main class), so for example if you have three different classes: Wizard, Knight, Thief each class will be set to a different maincclass value. When you're character is offered sub-classes, the maincclass variable will be checked for these values:
1 = Wizard
2 = Knight
3 = Thief
When the variable equals 1, the sub-classes for Wizard will be offered, etc.
Now here's how you do it (it's very simple):
When your choose your main class, have the next command be:
Control Variables: [maincclass] = X (The = means you told it to "Set" the variable to the value X, where X is the variable equal to the class)
Now we're going to have the sub-class teacher check for the main class:
Conditional Branch: Variable [maincclass] == X (The == means told it to check that maincclass is "Equal to" "Constant" X)
After the conditional branch you'll just offer the sub-classes based on the value of maincclass. You can extend this to as many classes as you want by just giving another unique number to each main class that you want. Just remember that each main class number needs to be unique and it needs to be Set to it, not Add, Sub, Mul, Div, Mod.