Is it possible to set a value to a field based on certain conditions

Is it possible to set a value to a field based on certain conditions

Greetings

Say i have a field that i want to set its value based on the value of another field..

for example if "number" field has value greater than 10, i want to set my field's value to X.
Or if radio group had option 1 selected, then i want to set my field's value to Y.

Is there a way to do this? if not, are there any work arounds or similar methods that might help me do what i want?

Thanks