You're describing a conditional value list and you can pull up multiple examples of this if you use the advanced search link above and search under those terms. You can't quite do what you describe, but you can have to fields with value lists. You would select the class in field 1 and then the students listed in field 2 would be restricted to just students in the class you selected.
Here's a thread on setting up conditional value lists that should help:
Custom Value List?
Perfect! Thank you Phil. The issue is resolved