I'm assuming in your table with the payment plans, you have each one identified by "monthly, quarterly, yearly" etc...
My suggestion, instead of a field with "montly, quarterly, yearly" in the field, put in there the number of months those plans equate to. IE: montly =1, quarterly = 4 yearly...