I want to sort all data in custom manner with conditional statement. Firstly, I will check if column1 & column1 are same. If they are same then I will compare based on column3.
Example
| id | total_score | mcq_score |
|---|---|---|
| 1 | 50 | 30 |
| 2 | 50 | 40 |
| 3 | 50 | 20 |
Expected output
| id | total_score | mcq_score |
|---|---|---|
| 2 | 50 | 40 |
| 1 | 50 | 30 |
| 3 | 50 | 20 |