title: SQL returning custom values based on query results keeping performance in mind
body: <p>I need help on performance of a query I have that is very slow.</p>
  
  <p>The query is doing a case on a column in order to return a different text value 
  based on the number.
  If I had a table with values 1-5 and 8-10 If something has a value of 1 it should display 'Apple' or if it is 2 it must display 'pear' if it is anything other than 1-5 then it is 'other'. Currently a case statement is being used, but I heard that functions on a query makes it slower.</p>
  
  <p>All I want is the 'Wording' to appear instead of the the number but because the table is so big it feels to me like it is iterating each row just to determine what to display.</p>
  
  <p>Is there a faster way of doing this.I considered doing a join, which seems like it would work nice, but I dont know how to write 'other' for anything other than 1-5</p>