Replace IFs for Switch.