As @BusinessPlanQuickBuilder pointed out, A simple if...elseif...else
would do the Trick. However, if your intent is to stick to Ternary Comparison; it is also very much possible to nest them like so:
<?php echo ( $squar['product'] == 0) ? ' soldout ' :
( ($squar['product'] > 100) ? '> 100' : $squar['product']);
?>
This is basically saying the same thing as @BusinessPlanQuickBuilder. You can think of @BusinessPlanQuickBuilder's approach as speaking Inglés and this approach as spitting Anglais.... Both are saying the same thing - only in different ways... So you can choose whether to join the Spanish Team or Rock with that French Club... Honestly, in this context, one would not be in Error to choose Inglés because it is much more human-readable plus Spanish is so much Fun...
Cheers & Good-Luck, Mate ✌️☝️