I'm assuming you want to show your text through a text object.
In this text object, on the layout tab, under "show" set show to conditional. Here you can make various settings, beginning with very simple ones all the way to more complex formulas.
Generally, a "0" in this field means "do not show" whereas a "1" means "show". So you could build an if statement around this. I would suggest using the getselectedcound function here. Each text object will need an own statement.
However, an actual if statement is not required for a conditional show to work.
For example: You could set your show condition for your first object to getselectedcount(dim1)=0, the second one to getselectedcount(dim2)=0 and so on.
Hope this helps you out,