declate @returnval varchar(10)
set @returnval = select singleval from mytable where it_only = 'single value'
return @returnval
You can also use this to return a table value
Software engineers are trained to read and understand code; they are not trained in mind reading. Document the purpose not just the functionality.