How to create a conditional zoom button?

Hi everyone,

I have created a query tool and its result is coming in a table from the database on the basis of selected attributes of feature. I want to create a zoom button for each row of the table. If the user clicks on zoom button, it should zoom in on the related record’s position on map. Records will be buildings and infrastructures. How can I get the functionality? Please help me. I am facing issue; how can I get the location of a feature (building/infrastructure) by using its attributes from map?