I was wondering if there is a way to set a link to a template in the panel.
Lets say I have a slideshow on my homepage and I want that the first slide
is linked to pageX and the second slide to pageY.
I want that the user can choose in the backend to which site it should link.
Thanks for any help 
You can use a select field with options: pages
. I often use my Quickselect Field for that, since the added search makes it more intuitive.
In your template you can use something like that:
if($linkedPage = page($slide->link())) }
go($linkedPage);
}
EDIT:
If you only want to link the image in the slideshow, simply echo the select value in the href
.
Thank you @thguenther. It is working 