Feild type is change as per the selection in combo box?

Check how Depends On works in ERPNext.

You can set value in the Depends On field from Customize Form.