Relating two Lookup fields and making them dynamic

Relating two Lookup fields and making them dynamic

Hello,

I am trying to find a solution on how can I relate two lookup fields and how can I dynamically change the values of one lookup field on the basis of the choices made in another lookup field related to it.

For example, I have two lookup fields; Categories and Sub-categories. In categories, I have two values; Vegetables and Fruits. In sub-categories, I have 4 values: Essentials, Leafy, Seasonal, and All Year, where Essentials and Leafy are the sub-categories related to Vegetables, and Seasonal and All Year are the sub-categories related to Fruits. 

Suppose if I select Vegetables in the Category field, I only want the options of Essentials and Leafy to be shown in the lookup field of Sub-categories. I am unable to figure how can I create a workflow for this particular condition and situation. Furthermore, the problem gets complex once we select Categories and Sub-categories because then we have to select a product on the basis of the previous two choices made. 

Can someone please help me understand how can I solve this and what approach should I take? Thanks a lot in advance.

I am also attaching the screenshot of the form just for better understanding.