I have the following table (immutable) on SQL:

| CATEGORY | CODE |
| --- | --- |
| Section | A |
| Division | 01 |
| Group | 011 |
| Class | 0111 |
| Class | 0112 |
| Division | 02 |
| Group | 021 |
| Class | 0211 |

I want to say that CLASSES (ex 0111 & 0112) belongs to GROUP (011) who belongs to DIVISION (01) who belongs to SECTION (A).

Example: If somebody searches Class 0211, I want my table to know that Class belongs to SECTION A.

How can I do this? Thanks guys.