Rewrite this code with sequileze typescript
ROUND((
            CASE
            WHEN ${betPrefix}bet_type = ${BetType.BACK} AND ${betPrefix}status = ${Settlement.WINNER} THEN matched_liability * (odds - 1)
            WHEN ${betPrefix}bet_type = ${BetType.LAY} AND ${betPrefix}status = ${Settlement.WINNER} THEN matched_liability / (odds - 1)
            ELSE 0
            END)::NUMERIC, 2)
           Provide your reponse without using the word typescript.
user