Views - Conditionally rewrite title link attribute based on field empty value
From what I understand, either the "Link" OR the "File Attachment" fields will be filled in, but never both. If that is correct the solution is pretty simple.

You need to "Exclude from view" the title field.

Then, you need to Rewrite both the File Attachment and Link fields via the "Rewrite the output of this field" and put the [title] (or wahtever the field name is) in the rewrite field.

Then also for each of those 2 fields, check the "Output as link" and put the link field into the link path for the link, and put the file attachment field into the link path for the file attachment.

Now you only need to open the "No Results Behavior" fieldset for each of those fields and check "Hide if Empty" and "Hide rewriting if empty".

Now either one or the other will be output with the title as a link to either the page or the file attachment depending on what you filled in on the node edit screen.