background-color is an attribute that can be set for the <TR> tag so create a style sheet and define your different color attributes using the applicable names.
So your css may look something like this:
tr.Internet{
background-color: #0000FF;
}
tr.Business{
background-color: #00FF00;
}
Then in your code, add a class attribute to the <TR> tag.
while ($row = mysql_fetch_assoc($result)) {
echo "<tr class=\"".$row['CategoryID']."\">";
echo "<td>";
This is going to screw you up if your Category IDs use more than one word, and you may need to do something else, like using a case/switch in your definitions. Without knowing for sure, let's start with this, and go from there.