I have below SOQL statement in an Apex class, Column Promotion returns true or false, If the value is true then it should return 'Promo Enabled' otherwise ''. Can we handle this within the select query?
@AuraEnabled
public static Object searchLocations(Decimal lon, Decimal lat, Integer radius, Integer resultSize){
return Database.query('SELECT Id, Name, Street, City, State, PostalCode, Country, Primary_Phone_Number__c, Promotion,'+
'DISTANCE(Address, GEOLOCATION('+lat+', '+lon+'), \'mi\') '+
'FROM ServiceTerritory WHERE DISTANCE(Address, GEOLOCATION('+lat+', '+lon+'), \'mi\')>0 '+
'AND DISTANCE(Address, GEOLOCATION('+lat+', '+lon+'), \'mi\')<'+radius+
' AND IsActive=TRUE '+
'ORDER BY DISTANCE(Address, GEOLOCATION('+lat+', '+lon+'), \'mi\') LIMIT '+resultSize);
}