Is this one-liner correct?
Let's step through it:
return a <= b ? (c <= a ? a : c <= b ? c : b ) : c <= b ? b : c <= a ? c : a;
suppose a <= b. Then if c <= a, return a. Thus, c <= a <= b and a is the correct thing to return. On the other hand, if c <= b, then c <= b < a (b/c we know that c <= a is not true). So, b is appropriate to return.
Now suppose a <= b is false - then b > a. Now if c <= b, we have c <= b < a, so b is correct. If c <= b is false, then we have c > b and b > a so we will return a. Notice that you have an extra comparison. (we already know that b > a, and we've just learned that c > b, which gives us the ordering)
Notice two things about this one-liner: while it turned out that your logic was correct, it was difficult and time-consuming to determine that correctness, and it doesn't scale (imagine this one-liner for five items...)
The correct approach is to sort the list and take the middle item.
(which is exactly what you asked for: "just the one that's in the middle if these 3 were ordered from smallest to greatest.")