Mc moving according on mouse x and y coordinates

I´m trying to make a MC to change it´s x location according to the mouse position. Let´s say that the Mc moves to x=100 when the mouse_x is > 300 and y < 200. and moves back when the mouse goes back.

thanks