How to use ternary operator inside the select syntax?

@aanandsanraj
Thanks for your answer.

I want to make the condition which inside the select syntax can be dynamically recognized whether it has content or empty.

As my sample, the condition of “DC” might contains some info most of times, but it has some exceptions that “DC” might be no content inside.
Hence that’s the reason why I tried to use ternary operator, otherwise it can’t get results when “DC” be empty which cause get the wrong report.