Change Dropdown field to multiselect field according to Category

Hello everyone,

I have a "Type" field as  dropdown and I want to change it multiselect field according to Category change. Please share your idea that how can I do it.

If category = specimen then Type field = multiselect.

If category = product then Type  field = dropdown.

Thanks

Laxmichand saini