Little bit tricky but you can achieve without code.

-> Add a new boolean field to taxonomy term.(eg: show link(field name))

[![enter image description here][1]][1]


  [1]: https://i.sstatic.net/jMJ3z.png