It is not recommended to use a case statement without some preprocessing that would probably involve using the dreaded
if/else if...
construct, but if you're just trying to be different, you could try this:
int x = 0;
string status = "";
status = (status == "" && x >= 50) ? "You passed" : status;
status = (status == "" && x >= 0 && x < 50) ? "You failed" : status;
status = (status == "" && x < 0) ? "Not valid" : status;
The code above was written in C# but it should translate to C quite easily. The code above was tested with "x" set to -1, 0, 30, and 51