Embedded cascaded if-else statements
Let's say you have a numeric value 'x' (a measured frequency) and bands with defined lower-bounds and upper-bounds, and you wish to find which band contains 'x'. This can be thought of as a mathematical feasibility problem in one direction, and many algorithms could be used. I will describe you in this answer how to use a bissection-style search using a bit of pseudo-code to solve your problem.

Enumerate possible bands:

enum band_e = {B1, B2, B3 ... Bn};


And write up a function like this for example:

band_e getBandFromFreq(double x)


In the function, describe your bands bounds:

const double bands_lb[] = {LB1, LB2, LB3 ... LBn};
const double bands_ub[] = {UB1, UB2, UB3 ... UBn};


Now guess a band in which 'x' could be, let's say B3. If both constraints of B3 are satisfied (LB3 &lt;= x &lt;= UB3), then you guessed correctly, and your function can return B3. 

If the guess is incorrect, at least one of the constraints will be satisfied (e.g. LB3 &lt;= x, but x > UB3). This will give a direction in which to continue your search (towards LB4 to LBn in this case). Bissection search means repeating the guess at the middle band of this new range. Each progressive "guess and check" (or iteration) will hopefully reduce multilple possible bands still left to be checked.

Hope this helps! Many other search algorithms can be implemented though, pick your poison. Bissection is usually the most intuitive one.