Restricting subject to a block

Hey guys I’m trying to create a school enrollment system and have a issue i would need help with

The 4 yellow boxes are 1,2,3,4 respectively

In the drop down list, there are 4 options that contain different subjects, so HB1 contains 2 subjects for example

  1. When I select the subject in H1B1, I only wanna show it in yellow box 1 and it should not be shown in other yellow boxes

  2. When i select a subject from H1B2, I only want the subject to be shown in yellow box 2

So that is the issue, How am to restrict the subjects only being shown in the specific boxes.
so H1B1 shows only in yellow box 1, H1B2 only shows in yellow box 2 etc

Here is the data base i have created:

Please help me with this it will be much appreciated!

I think you can use different repeating group for different boxes (different course), then show hide when required.