{segment_2} does seem to work but just not with Matrix, this was my fault as there is a different type of field for Matrix.
I have used the query module a few times, but I am not sure how I could use it here.
The above example I posted, could this be used for each option? or would this bulk out the code too much?