Like SQL Queries [SQL CASE WHEN or IF ELSE IF] is possible is there possibilities in Room Database also. For Example.
Select * from SampleTable CASE

    WHEN CreditRating <= 2  THEN 'NO TRADE'
    WHEN CreditRating  <= 4 THEN 'POOR'
    WHEN CreditRating  <= 6 THEN 'AVARAGE'
    WHEN CreditRating  = 7 THEN 'GOOD'

    ELSE 'PERFECT' 

    END AS RATING

Related posts

Recent Viewed