Hello,
I think the links are on menu block, and you need to scroll to particular element which belong to a screen,
First we need to pass the value from block to screen, so you have to define a Event on your Menu block, and through which you will pass the value to the screen, on your block you need to create a screen action that will trigger when a user click on a link then the screen action will be trigger , here you need to do some logic to get the value of link which is clicked(value will be vary on your logic),
If you want the text of the label you can use JS
Example
var e = document.getElementById('myName1').getElementsByTagName('p')[0].
var theText = e.innerHTML;console.log(theText);
// or, in sufficiently-modern browsers
e = document.querySelector('#myName1 p a');
theText = e.innerHTML;console.log( theText );
what ever you will prefer
Then through even pass the Value
Now if your Screen is the Parent of your block then only you will get the value, else check whether you menu block is called on another block, if so then handler will be defined on the other block which will behave as a parent for the menu block.
Once you get the value
on your handler compare it with your switch conditions, and use it as described in above comment by @Jozy
Thanks