Click link available in table based on condition

I have a table with the below data:
I want to click on the link of the Id only for which the Status is “Pending”.
How can i achieve that. Kindly help.

The best way is to use an xpath locator. There you can use contains() to make the text “Pending” a condition.