Select with a preffered where condition, but if missing use another
One way of accomplishing this might be a self-join (assuming (name, lang) uniquely identifies rows):

SELECT e.name, coalesce(s.text, e.text) AS text, coalesce(s.lang, e.lang) AS lang
FROM (
  SELECT name, text, lang FROM texts
  WHERE name IN ('name1', 'name2', 'name2')
    AND lang = 'E') AS e
LEFT JOIN (
  SELECT name, text, lang FROM texts
  WHERE name IN ('name1', 'name2', 'name2')
    AND lang = 'S') AS s
ON e.name = s.name