find() returns a record not a single value/string. It’s like a row of the table. So if you want to output a value of this row you’ll need to select it s.th. like
See, you get the record matching your conditions etc. and you have to pick the single value you would like to display, use or whatever. In the example above the value of ‘catname’ of the record with catid = 42 is echoed.
For consistency, it’s worth retrieving the row object. The overhead is small enough. Have you got some more context so we can make a better assessment? How many times will this be repeated on a page?
If performance becomes an issue, you can switch back to DAO for such simple queries. No AR overhead involved, you get a clean result array. There’s nothing wrong to put such a method inside the Category model:
public function queryNames($catid) {
$sql='SELECT catname FROM category WHERE catid=:catid';
return Yii::db()->createCommand($sql)->queryColumn(array(':catid'=>$catid));
}