How to Display One Value from Two Fields in a Drupal View
There is a situation where one field of a Drupal View needs to pull its content from two fields (aka cck fields) of a node. In my case, they were default author field and a custom field called contributor. This example uses Drupal 7 and Views 3.
If optional the contributor field was not empty, it would display the contributor and skip the author field. If there was no contributor, then the author, which cannot be optional, would be displayed by default.
Add two fields; order matters
This conditional display can be achieved with the View's configuration interface.
First, add those two fields in the Fields section in the View's edit mode; author first, then contributor. Note that in Views 3, author's name can be accessed only after a relationship for author is established (Philosophy of include-it-only-when-you-need-it).
Configure Author field
Enter the configuration for the author and check the checkbox for "Exclude from display".
Configure Contributor field
Now configure settings for the contributor field. The trick is to configure the "No results behavior" section. Enter "[name]" in "No results text".
With this logic, author will be displayed only if the contributor field is empty. Otherwise the contributor will be displayed and not the author. This method could be applied to three or more related fields as well.
Since Views allows you to pull fields from more than one content type, these related fields need not come from the same content type (aka bundle in D7 lingo).