SELECT DISTINCT R.RouteID, R.RouteName, R.Description AS RouteDescription, R.NationalRouteNumber, R.BoardRouteNumber, R.RouteLength, OP.Description AS RouteOrigin, OP.PlaceID AS RouteOriginID, DP.Description AS RouteDestination, DP.PlaceID AS RouteDestinationID FROM Verified.Routes AS R INNER JOIN Verified.Places AS OP ON R.OriginPlaceID = OP.PlaceID INNER JOIN Verified.Places AS DP ON R.DestinationPlaceID = DP.PlaceID WHERE R.RouteStatusID = 1 AND (CASE WHEN ISNULL(@SearchText, '') <> '' THEN CASE WHEN R.RouteName LIKE '%' + @SearchText + '%' THEN 1 ELSE 0 END ELSE 1 END) = 1 ORDER BY R.RouteName ASC