Passing variable to annotations based on selected

Hi. I need to generate different annotations for panels basad one each value in the selected variable $StbIP.

Using $StbIP in annotation definition mysql query, draws the same annotation on all panels becouse variable is passed as array with all selecected IPs. How to change variable i query to send only one value, used in pannel.