enable disable fields with field



hello I have a problem

I have three fields field, they should be required when the user brings out only one.

If the user highlights two fields and then delete the value of one, all fields must be mandatory

if you do not insert anything, fields should not be mandatory

how can I do ?????