Caterpillar Interview Question

Using if else condition in column formatting