You will have to have make a separate check for each condition. There are other ways to do it (such as a complex regex), but this is the easiest and most readable.
set nameMatch1 to "Name"
set nameMatch2 to "Demo"
if (NameOnDevice contains nameMatch1) and (NameOnDevice contains nameMatch2) then
set nameMatch to NameOnDevice & " : Name Match"
end if
If you are adding matching criteria, you may eventually add more. Instead of adding more variables, and more conditions, you may want to put all of your words in a list and check against that. In the future, if you need to add more words, you can simply add the word to the list. I've extracted it into a separate sub-routine here for easier reading:
on name_matches(nameOnDevice)
set match_words to {"Name", "Demo"}
repeat with i from 1 to (count match_words)
if nameOnDevice does not contain item i of match_words then
return false
end if
end repeat
return true
end name_matches
if name_matches(nameOnDevice) then
set nameMatch to nameOnDevice & " : Name Match"
end if
Edit after clarification
If you have no control over the matching text (if it comes from an outside source, and is not coded by you), you can split that text into words and use those as the wordlist in the second example. For instance:
on name_matches(nameOnDevice, match_text)
set match_words to words of match_text
repeat with i from 1 to (count match_words)
if nameOnDevice does not contain item i of match_words then
return false
end if
end repeat
return true
end name_matches
if name_matches(nameOnDevice, match_text_from_some_other_source) then
set nameMatch to nameOnDevice & " : Name Match"
end if