@Moosa Please read the How It Works section of the above link, it explains it in as much detail as anyone here could.
And that is just one way of picking any available WiFi connection in the area of your device.
If you have pre-set WiFi options, then you can set up something similar to how typical re-connection management works for reconnecting if Server link is lost… only using different connections each time.
-
Boot…
-
Try to connect to A… if after x time with no connection…
-
Try to connect to B… if after x time with no connection…
-
Try to connect to C… if after x time with no connection… curl up and have a nap.
You are going to have to figure most of this out, as no one is going to code it all for you.