The Dow Jones Industrial Average stayed positive this week, adding roughly 194 points today in what has been a solid week so far, as investors adapt to an economy that is likely headed for a recession at some point.

Federal Reserve Chairman Jerome Powell in testimony to Congress this week acknowledged that it will not be easy for the Fed to engineer a soft landing as it continues to raise interest rates in order to tame some of the highest inflation seen in four decades.

Yesterday, Citigroup economists raised their chances of a recession to 50%. But after such a large sell-off this year, investors are taking a breather this week and trying to get more clarity on what's next, which has allowed the Dow to have a decent week. Here are three stocks that drove the gain today.

A range of winners

There didn't seem to be one particular sector or stock that investors favored today. The cloud giant Salesforce (CRM -1.59%) led the Dow today, with shares rising more than 3%. Salesforce has found itself at the top of the index a lot recently after its earnings report at the very beginning of June showed strength in the business.

Demand for Salesforce's products hasn't waned and the market opportunity continues to grow with more companies moving their operations to the cloud and digitizing their operations. Perhaps investors see the company's business as more recession-proof than it once was.

The drugmaker Merck (MRK -0.11%) saw its shares rise more than 3% today, making it the second-largest gainer in the Dow. Healthcare and pharmaceutical companies can perform well in inflationary environments because their products and work are always needed and they are able to raise drug prices to adjust for inflation.

But the U.S. Food and Drug Administration also granted Merck approval today for a new vaccine called Vaxneuvance, which can treat pneumonia in infants and children. The U.S. Centers for Disease Control and Prevention also recommended the vaccine on a preliminary basis.

Shares of Nike (NKE 0.95%) also did well today, gaining nearly 3%. Nike performed well despite some events that weren't necessarily positive for the company. The shoemaker and athletic brand said it is planning a full exit from Russia several months after suspending operations due to Russia's ongoing invasion of Ukraine.

Nike on its last earnings call said that revenue from its Russia and Ukraine operations made up less than 1% of total revenue, which isn't a lot but still a hit to revenue in what could be an increasingly difficult economy with slowing consumer demand.

Nike also got downgraded today from a "buy" to a "neutral" rating by analysts led by Mitch Kummetz of Seaport Research Partners. Kummetz said his team downgraded Nike because of slowing consumer demand and the company's decision to focus on direct-to-consumer sales. Nike will report earnings on June 27.

Should you buy any of these winners?

Of this group of three, I am much more in favor of buying Salesforce and Merck, which seem to have much more resilient businesses heading into a recession and growing market opportunities. Salesforce believes the size of its Salesforce service market could reach $33.5 billion by 2029.

Merck also appears to be making inroads with its recent vaccine approval in the area of pneumonia, a market largely controlled by Pfizer. Meanwhile, Nike faces a backdrop of slowing consumer demand and is by no means cheap, trading at more than 28 times earnings.