In the midst of the worst commodity slump in years, investors still want their dividends.

That was illustrated as energy firm Oneok Inc. said Monday it was committed in 2016 to sustaining the dividend at its unit that processes and transports natural gas. Oneok’s shares soared $2.92, or 15%, to $21.85, making the Tulsa, Okla., company the day’s biggest gainer in the S&P 500. Oneok’s shares are down 56% so far this year.

Dividend-paying...