I want to add multiple ssid as backup how to do it

im using esp8266 standalone
i want to aad multiple connection .if connection 1 is offline device connect to the 2nd connection.

Just use an if, else if statement.