Format a value from other values in the table
While clarifying your problem you say "how can I make it so if I ever rename Beach I don't have hundreds of potential problems?" This sounds like a normalization problem to me. Looking at the examples above I think you're mixing data and formatting inside the database, then trying to untangle that in processing.

Starting from an analysis of the problem domain it looks like you have two entity types - Location (or names) and Path, where a Path connects exactly two Locations. This I would implement as two tables. As you're concerned about changing natural keys without touching many rows I'd implement surrogate primary keys (using pseudo code since each DBMS's dialect will vary).

Location
  LocationId    int primary key
  LocationName  char(999) not null

Path
  FromLocationId int not null FK references Location.LocationId
  ToLocationId   int not null FK references Location.LocationId

  Primary key (FromLocationId, ToLocationId)

insert Location values (1, 'Beach');
insert Location values (2, 'Town');
insert Path values (1, 2);


The presentation can be taken care of in SQL if you really want to, though I'd suggest letting the persistence classes of the application take care of it:

select 1 as ID, l.LocationName
from Path p
inner join Location l
  on l.LocationId = p.FromLocationId

union all

select 2, l.LocationName
from Path p
inner join Location l
  on l.LocationId = p.ToLocationId

union all

select 3, f.LocationName + ' to ' + t.LocationName
from Path p
inner join Location f
  on f.LocationId = p.FromLocationId
inner join Location t
  on t.LocationId = p.FromLocationId

union all

select 4, t.LocationName + ' to ' + f.LocationName
from Path p
inner join Location f
  on f.LocationId = p.FromLocationId
inner join Location t
  on t.LocationId = p.FromLocationId

union all

select 5, f.LocationName + ' to ' + t.LocationName + ' Path'
from Path p
inner join Location f
  on f.LocationId = p.FromLocationId
inner join Location t
  on t.LocationId = p.FromLocationId;


Because of the UNION ALL each path will produce five rows of output. These are distinguished by the constant-valued ID column in each sub-query so a where ID = .. query will work as you imagine.

Likely you will have more than one path in your database. It may be worth adding the column PathId to Path. Then your application queries become where PathID = xxx and ID = 5.

Now if you rename "Beach" to "Banana" exactly one column of one row changes (just like 3NF says it should) but all results return the new name, guaranteed, with no possibility of inconsistent results.