Here is what you're going to look at doing...
In a parallel process somewhere on your map, do something similar to the following:
1) Make a new variable operation. Select a new variable that you'll name "Boulder X". On the next set of options, pick "Set Equal." On the final set of options, select "Sprite", the event name of your Boulder, and "X Coordinate". It's important that you DON'T use Screen Relative X, just X Coordinate is what you want.
2) Do the exact same thing with a new variable called "Boulder Y". Change "Y" out for all instances above where I said "X."
3) Go to your map and see what coordinates your switch is at.
4) Go back to your event and make a conditional branch that checks if variable "Boulder X" is equal to the X Coordinate of your switch. Inside of that conditional branch, make another conditional branch that checks if variable "Boulder Y" is equal to the Y Coordinate of your switch.
That's going to be the skeleton of your system. Put whatever you want inside of the second conditional branch; this will be what happens when the switch is pressed. You'll need yourself some "Else" handlers if you want your puzzle to be unsolved when the boulder moves off the switch.
Hope that helps, enjoy!