In SAP DataSphere (also known as SAP HANA Cloud), you can use a `CASE` statement to achieve the conditional logic you're looking for. Here's how you could modify your code using a `CASE` statement:
```sql
CASE
WHEN [SALESORGCODE] = '5800' OR [SALESORGCODE] = '5831' THEN 'AOFC'
WHEN [SALESORGCODE] = '6300' OR [SALESORGCODE] = '6500' THEN 'AL SEER OMAN'
ELSE UPPER([DTL_SALES_DESC])
END
```
In this code:
- The `CASE` statement