javascript – How to query SharePoint items that contain one or more text values CAML?


I want to query for SharePoint items that contain at least one or more specified texts. For example, I have a field called “Pets.” A SharePoint item would have a value that looks something like “Cat, Snake, Spider” or “Bear, Rat.” So the number of pets will vary. If I want to only query for items that contain the words “Cat,” “Dog,” or “Frog,” how would I do that using CAML query?

I tried this:

<Query>
    <Where>
        <Contains>
            <FieldRef Name='Pets' />
            <Value Type='Text'>Cat</Value>
        </Contains>
        <Contains>
             <FieldRef Name='Pets' />
             <Value Type='Text'>Dog</Value>
        </Contains>
        <Contains>
            <FieldRef Name='Pets' />
            <Value Type='Text'>Frog</Value>
        </Contains>
    </Where>
</Query>