Authentication Fallback Flow with KeyCloak

I’m investigating whether we could use KeyCloak in our existing product. For authentication, we have built a proprietary flow where we first check if user could be authenticated using RADIUS. If not, then we try to check whether he could be found in configured AD/LDAP. If not found there as well, the last fallback option is to check if he could be found in local DB.

Considering this, how could I achieve the same auth flow using KeyCloak?