Hi,
Using a map (in the attached scene, I've used a Gradient Ramp map) to drive the Transform > Rotation values (in this case, it might be, for example, just for the Y-axis) would probably be the most versatile way. Please find attached a sample scene showing this kind of setup (230921_mappedRotationSampleScene_iToo).
I hope that helps.
Best regards,