How to use ternary operator in the condition of any Display Option?

Hi Experts,

 

I would like to know the proper syntax of the ternary operator which can be used in the condition of the Display Option.

I would also like to know whether we can use ternary operator in the condition or not?

 

Kindly help me with this.

 

Thank you in advance.

 

Regards,

Anjali