I'd start this blog by issuing a warning that Direct Database requests should be used sparingly. A Direct Database Request (DDR) bypasses the OBIEE metadata defined in the repository and this can have security implications if not managed properly where users could potentially have access to data that they should not have access to.
There are some use cases for DDRs like building an OBIEE analysis to display the status of a transactional process for instance.
According to the OBIEE user guide documentation, you can not specify conditional formatting for columns of a Direct Database Request.
This post describes a "workaround" which enables you to achieve this. In the example below, all you need is a little HTML and bingo!
All you need is a CASE statement to implement the conditions of your logic and on the column that you'd be applying the formatting, go to Column Properties > Data Format and change the Treat Text As field to HTML.
A bit about me. I am an Oracle ACE Pro, Oracle Cloud Infrastructure 2023 Enterprise Analytics Professional, Oracle Cloud Fusion Analytics Warehouse 2023 Certified Implementation Professional, Oracle Cloud Platform Enterprise Analytics 2022 Certified Professional, Oracle Cloud Platform Enterprise Analytics 2019 Certified Associate and a certified OBIEE 11g implementation specialist.