create a picklist based on criteria, how to setup the formula?

create a picklist based on criteria, how to setup the formula?



In Form Class, the field linked to For Student is a multiple select lookup
In Form Student there are fields First_Name, Last_Name


I have another form, called StudentInfo

Field: Student (picklist to Form Student)
Field: Class (picklist to Form Class)


But I only want to load Class that are linked to that particular student chosen.


Consider example:

Student:
Name: Jane Doe

Student
Name: John Doe
Class

Class
Title: Science
Students: Jane Doe, John Doe

Class
Title: Math
Students: John Doe


In my Form StudentInfo

Student is picklist from form Student
Class is picklist from form Class

If user chooses Jane Doe in this example, he is only to see Science.

How do I write such criteria for this picklist?