"Your question is a bit ambiguous so I'll try for each option..
1) If you want to format a row based on a cell value...you're a bit out of luck. You can only format a cell based on its value, so if you select a row...it's the values in the row you're basing it on. The only way I'm aware of doing this would be some VBA coding - others may have a suggestion though.
2) If you want to format a cell differently based on the text in it...select the cell, go to format->conditional formatting. Choose the same cell in the conditional term. Leave the condition as ""Cell Value is"" and specify the format to use based on that text. You can then add more conditions for each potential text value."