With XPath this can be done using the comment()
node test:
//table[.//comment()[contains(., 'this one')]]
This selects all table
elements containing a comment (at any depth) that contains the text 'this one'
.
I'm pretty sure this is impossible with CSS.